package cn.com.cifi.mars.mapper.mars;
import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;

import cn.com.cifi.mars.bean.vo.returnPlan.returnReport.ReturnPlanProgressVo;
import cn.com.cifi.mars.entity.ReturnPlanVersion;

/**
 * <p>
 * 回款计划版本表 Mapper 接口
 * </p>
 *
 * @author JingYuanXiang
 * @since 2020-11-06
 */
public interface ReturnPlanVersionMapper extends BaseMapper<ReturnPlanVersion> {

    void delById(@Param("id") String id,@Param("alias") String alias, @Param("isDel") int isDel);

    List<ReturnPlanVersion> selectStageIdListByProjectIdGroupByStageIdOrderByCreateTimeDesc(@Param("projectId")String projectId, @Param("isDel") int isDel);

    List<ReturnPlanVersion> selectByIdList(@Param("idList")List<String> idList, @Param("isDel") int isDel);

    List<ReturnPlanVersion> selectByRegionId(@Param("regionId") String regionId, @Param("isDel") int isDel);

    List<ReturnPlanVersion> selectByProjectId(@Param("projectId") String regionId, @Param("isDel") int isDel);

    String selectNewVersionTypeByStageId(@Param("stageId")String stageId, @Param("isDel") int isDel);

    void updateIsAssessmentByStageId(@Param("stageId")String stageId, @Param("isAssessment") int isAssessment,@Param("isDel") int isDel);

	ReturnPlanVersion selectBudgetReturnPlan(@Param("stageId")String stageId, @Param("versionType")String versionType, @Param("versionIdentify")String versionIdentify, @Param("versionStatus")String versionStatus, @Param("isDel")int isDel);

	List<ReturnPlanVersion> selectListByStageIdAndVersionType(@Param("stageId")String stageId, @Param("versionType")String versionType,@Param("isDel") int isDel);

    List<ReturnPlanProgressVo> selectReturnPlanProgress(@Param("yearMonth") String yearMonth, @Param("projectIdList")List<String> projectIdList, @Param("name") String name, @Param("versionStatus")String versionStatus, @Param("sTime") String sTime, @Param("eTime")String eTime, @Param("isDel")int isDel);

    List<ReturnPlanProgressVo> selectAll( @Param("projectIdList")List<String> projectIdList,@Param("name") String name, @Param("hrOrgType") String hrOrgType, @Param("isDel")int isDel);

    Integer selectSupplyIsSalableOrStageSelfSustainment(@Param("sourcePriceId") String sourcePriceId,@Param("orgType") String orgType, @Param("Salable") String Salable, @Param("stageSelfSustainment") String stageSelfSustainment);

    void deleteAll();

}
